package com.lhnstart.learn.spi_;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * 测试case
 *
 * @author lhn
 * @date 2023/07/13 09:04
 * @since 1.0.0
 **/
public class TestSearch {

    public static void main(String[] args) {
        ServiceLoader <Search> serviceLoader = ServiceLoader.load(Search.class);
        for (Search search : serviceLoader) {
            search.searchDoc("hello world");
        }
    }

}